#define _CRT_SECURE_NO_WARNINGS

#include<stdio.h>

int main()
{
	int a = 1;
	int j = 0;
	int count = 0;
	scanf("%d", &a);
	for (j = 0; j < 32; j++)
	{
		if (a & 1 == 1)
		{
			count++;
		}
		a = a >> 1;
	}

	printf("%d\n", count);

	return 0;
}